package com.demo.gulimall.order.config;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * @author Chen Yuan
 * @create 2023-06-26  9:20
 */
@Configuration
public class MyRabbitMessageConfig {

	// 修改 Rabbit 消息转换器, 改为 JSON 格式
	@Bean
	public MessageConverter messageConverter(){
		return new Jackson2JsonMessageConverter();
	}
}
